package com.sjzd.server.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sjzd.server.pojo.Department;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author sjzd
 * @since 2021-02-21
 */
public interface DepartmentMapper extends BaseMapper<Department> {

    /**
     *  添加部门
     * @param department
     * @return
     */
    void addDept(Department department);

    /**
     * 删除部门
     * @param department
     * @return
     */
    void delDeptById(Department department);

    /**
     *  根据父id获取部门信息
     * @param parentId
     * @return
     */
    List<Department> getDeptsByPid(Integer parentId);
}
